<style scoped>
.el-radio-group{
    display: flex;
    flex-direction: column;
}
.el-radio-group .el-radio{
    margin-right: 0px;
    margin-top: 10px;
}
</style>

<template>
    <el-radio-group v-model="direction">
        <el-radio :label="item.addressid" v-for="(item,index) in address_list" :key="index">
            Accepter:{{item.shiptolastname}} &nbsp;Country:{{item.shipcountry}} &nbsp; City:{{item.shipcity}} &nbsp; Address:{{item.shipaddr1}}
        </el-radio>
    </el-radio-group>
</template>

<script>
export default {
    name: 'address_list',
    data() {
        return {
            direction: 1,
            address_list: [],
        }
    },
    mounted(){
        this.getAddress();
    },
    methods:{
        getAddress(){
            this.$Axios({
                method: 'get',
                url: '/account/address',
            }).then(res=>{
                this.address_list = res.data.data;
                console.log(res.data.data);
            }).catch(error=>{
                this.$message.error("其他服务器错误"+error);
            })
        }
        
    }
}
</script>